import React from 'react';
import ReactDOM from 'react-dom';
import { Grid } from 'react-virtualized';

import './index.css';

// Grid data as an array of arrays
const list = [];

for (var i = 0; i < 200; i++) {
    list.push([i, 'Brian Vaughn', 'Software Engineer', 'San Jose', 'CA', 95125]);
}

function cellRenderer({ columnIndex, key, rowIndex, style }) {
    return (
        <div className="line_each"
            key={key}
            style={style}
        >
            {list[rowIndex][columnIndex]}
        </div>
    )
}



class OneView extends React.Component {

    render() {
        return (
            <Grid className="one_grid"
                cellRenderer={cellRenderer}
                columnCount={list[0].length}
                columnWidth={200}
                height={300}
                rowCount={list.length}
                rowHeight={40}
                width={1210}
                style={{ overflowX: 'hidden' }}
            />
        );
    }
}
export default OneView;